<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<head>
    <link rel="stylesheet" type="text/css" href="/css/style_member.css" />
    <title>会员注册-笔飞美术作品</title>
    <%@include file="../common/jspcommon.jsp"%>

	<%@include file="../common/js.jsp"%>
	<script type="text/javascript" src="js/jquery.validate.js"></script>
		<%@include file="../common/css.jsp"%>
	<script src="/js/jquery.json-2.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="box">
   	 <%@include file="../common/header.jsp" %>
    <div id="main_div">
        <div class="site_map"><a href="welcome.htm">首页</a> 》个人资料</div>
        <div id="member_div_2">
            <table cellpadding="0" cellspacing="0" class="member_table">
                <tr>
                    <td class="td_1" valign="top">
                        <div class="left_nav">
                        <ul>
	                            <li><a href="/member.htm">控制面板</a></li>
	                            <li	class="cur"><a href="/memberInfo.htm">个人资料</a></li>
	                            <li	><a href="/mOrders.htm">我的订单</a></li>
	                            <li><a href="/mMade.htm">我的定制</a></li>
	                            <li ><a href="/mActivity.htm">我的活动</a></li>
	                            <li><a href="/mHas.htm">关注收藏欣赏</a></li>
	                            <li><a href="mComment.htm">评论管理</a></li>
	                            <li><a href="mPay.htm">支付保证金</a></li>
	                        </ul>
                        </div>
                    </td>
                    <td class="td_2" valign="top">
                        <table cellpadding="3" cellspacing="1" class="member_table2">
                            <tbody>
                                <tr class="td1">
                                    <td style="width:25%; height:50px;">
                                        <b><a href="/memberInfo.htm" >账户信息</a></b>
                                    </td>
                                    <td style="width:25%;">
                                        <b><a href="/mBank.htm">银行帐号</a></b>
                                    </td>
                                    <td style="width:25%;">
                                        <b><a href="/mHobby.htm" class="current">我的喜好</a></b>
                                    </td>
                                    <td>
                                        <b><a href="/mAddress.htm">收货地址</a></b>
                                    </td>
                                </tr>
                                <tr class="td2">
                                    <td colspan="4" align="left">
                                        <div class="fl">
                                            <table cellpadding="3" cellspacing="1" style="width:560px; margin:5px;">
                                            <tr>
                                                <td style="height:40px;" colspan="4"><span class="style5">我喜欢什么样的艺术</span> </td>
                                            </tr>
                                            <tr class="td1">
                                                <td align="center"><b>按照媒介</b></td>
                                                <td align="center"><b>按照题材</b></td>
                                                <td align="center"><b>按照风格/运动</b></td>
                                                <td align="center"><b>按照部门</b></td>
                                            </tr>
                                            <tr>
                                                <td valign="top" class="td6">
                                                 <c:forEach items="${mediaList }" var="media" >
                                                   		<input name="doingCheckbox" hobbyId="${media.identifier}" type="checkbox" <c:forEach items="${hobbyList }" var="hobby" ><c:if test="${hobby.hobbyId eq  media.identifier}" >checked="checked"</c:if> </c:forEach>/>${media.name}<br />
                                                  </c:forEach>
                                                
                                                </td>
                                                <td valign="top" class="td6">
                                                  
                                                 <c:forEach items="${themeList }" var="theme" >
                                                   			<input name="doingCheckbox" hobbyId="${theme.identifier}" type="checkbox" <c:forEach items="${hobbyList }" var="hobby" ><c:if test="${hobby.hobbyId eq  theme.identifier}" >checked="checked"</c:if></c:forEach>/>${theme.name}<br />
                                                    </c:forEach>
                                                </td>
                                                <td valign="top" class="td6">
                                                     <c:forEach items="${sportList }" var="sport" >
                                               			<input name="doingCheckbox" hobbyId="${sport.identifier}" type="checkbox" <c:forEach items="${hobbyList }" var="hobby" ><c:if test="${hobby.hobbyId eq  sport.identifier}" >checked="checked"</c:if></c:forEach>/>${sport.name}<br />
                                                 </c:forEach>
                                                </td>
                                                <td valign="top" class="td6">
                                                    <c:forEach items="${deptList }" var="dept" >
                                                  	 <input name="doingCheckbox" hobbyId="${dept.identifier}" type="checkbox" <c:forEach items="${hobbyList }" var="hobby" ><c:if test="${hobby.hobbyId eq  dept.identifier}" >checked="checked"</c:if> </c:forEach> />${dept.name}<br />
                                                </c:forEach>  
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4" align="center" style="height:140px;">
                                                   <!--  <label for="extend_field_112">
                                                        <b>其他标签：</b>
                                                        <input type="text" name="extend_field112" value="" id="extend_field_112" code="like_tag" /><br />
                                                    </label> -->
                                                    <div class="submit_wrap mt10">
                                                        <input type="button" value="确认修改" tabindex="12" class="submit btn_special btn_qrxg" onclick="save();"/>
                                                        <input type="hidden" name="act" value="save_like" />
                                                    </div>
                                                </td>
                                            </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <%@include file="../common/footer.jsp" %>	
    </div>
</div>

<script type="text/javascript">
function save() {
	var doingList = new Array();
	$(":checkbox[name='doingCheckbox']").each(function() {
		if ($(this).attr("checked")) {
			doingList.push($(this).attr("hobbyId"));
		}
	});
	$.post("/saveHobby.htm", {
		doingList : $.toJSON(doingList)
	}, function(data) {
		if (data == 'success') {
			window.location.href="/mHobby.htm";
		}
	});
}
</script>
</body>
</html>
